1. Field of the Invention
The present invention relates to the sharing of a resource among consumers, and more specifically, to the sharing of a read-only-memory (ROM) device between processors in a computer system.
2. Description of the Related Art
The rapid acceptance of computer technology by corporations as well as consumers has led to the widespread use of computers. Further abetting this process is the continual reduction in size and cost of personal computers. Originally, personal computers were large items best suited for floor standing or desktop use. Eventually, they became smaller so that desktop use became the standard. Improvements in processor, memory and data storage capabilities have resulted in light weight, powerful mobile computers such as portables, luggables, laptops, notebooks, palm top and personal digital assistants. These computers can provide sufficient processing capability for audio visual applications, such as computer aided design, three dimensional animation, and multimedia presentation, even when used at remote locations.
Regardless of the computer's status as desktop or a portable computer, today's modem personal computer typically includes a microprocessor, a memory system, data storage devices, and input/output (I/O) devices such as a display, a keyboard, a mouse, and communication devices, among others. The computer system is typically initialized, or boot-strapped, during a power up sequence using system software and information representing a sequence of internal control variables stored within a system read-only-memory (ROM). Since the system ROM is non-volatile, the content of the ROM contains valid data or instructions so that the computer system can be reliably boot-strapped to a point where the disk operating system (DOS) can be loaded to complete the boot-up sequence.
One computer system utilizing the ROM-based boot code approach is the IBM personal computer (PC) developed by the IBM Corporation of Armonk, N.Y. In an IBM PC or an IBM compatible PC system, the system ROM stores the Basic Input/Output System (BIOS) which is executed upon power-up by the microprocessor to initialize the system, to perform a power on self-test (POST) and to provide certain low level, hardware dependent support for the display, floppy/hard disk drives, and communication devices. More sophisticated routines and data may be included in the system ROM, depending upon the needs and complexity of a given computer system.
In the original PC architecture, the BIOS code was fairly straight forward and required little memory space (about 32 KB total). BIOS code provides the lowest level of interface between the operating system and the hardware. It normally is located at the top of memory for the original 8088 system of the original PC. In the original IBM PC architecture, the BIOS code is stored beginning at F8000h. Following a system reset or power-on, the typical system first goes to the high memory area of the 1 megabyte memory map, where the boot code is stored. Further, a checksum routine is typically executed to verify the status of the BIOS currently available to the system. If the integrity of the BIOS is determined to be good, the boot code initializes the system and its peripherals and passes control to the operating system. This is done by jumping to the address pointed to by a jump vector. If the BIOS is found to be corrupted or unusable (i.e., the computed checksum value does not match the expected value), the computer system indicates a system failure. In such instances, the BIOS ROM needs to be replaced.
Recently, a large capacity, reprogrammable storage device called a flash ROM is used to store the POST and BIOS routines required for the initialization and operation of the computer system. As the flash ROM can be reprogrammed without being removed from the system, the flash ROM provides a more expeditious and less costly solution over conventional ROMs when software updates are required.
In addition to the microprocessor, other processing devices are also present in a modern computer. These processing devices can be a coprocessor for performing specialized processing, a digital signal processor for handling modem, video and signal processing requirements, and one or more microcontrollers which handle the peripheral devices and offload the processing from the microprocessor. For instance, a microcontroller such as an 8051-compatible microcontroller may be used to interface with the keyboard as well as other I/O devices of the computer system. These processing devices also require one or more ROMs to store their operating code.
Typically, the microcontroller has a small amount of on-chip ROM and RAM to enable the microcontroller to operate with a minimum part count. However, certain applications require more storage space than available with the built-in ROM on the microcontroller. In these instances, the microcontroller may require an external ROM device to handle more sophisticated application software. However, an additional ROM device undesirably adds cost to the system. Further, the increase in the part count decreases the overall reliability of the computer, as these additional components increase the possibility of a failure. Thus, it is desirable to share a ROM between the microcontroller and the microprocessor.
As the flash ROM storing the BIOS and POST codes is typically a high capacity device, the flash ROM usually has spare storage capacity to accept codes intended for the microcontroller. In previous portable computers, the flash ROM is shared between the microprocessor and a keyboard controller such as an 8051 microcontroller. In such systems, the microprocessor initially owns the flash ROM during the power-on reset and boot-up. After the microprocessor has verified system functionality using the POST codes, the microprocessor copies the BIOS contents stored in the flash ROM to its main memory array in an operation called "shadowing" to enhance the performance of the computer system, as the access speed to the main memory array is much faster than the access speed to the flash ROM. After the microprocessor has copied the BIOS contents of the flash ROM into the main memory array, the microprocessor only needs to occasionally access the flash ROM such as to reprogram the flash ROM. In the prior art, the microcontroller retains ownership of the flash ROM until the computer system is reset by the cycling of power to the computer system or until the computer system writes to a control register to regain control of the flash ROM. However, in the prior art, once control of the flash ROM is handed to the computer system, the microcontroller can no longer access the flash ROM until the system has been rebooted.
Although the sharing of the flash ROM between the processor and the microcontroller results in a system which is more efficient and economically desirable, the prior art sharing approach is undesirable in that, once the ownership of the flash ROM has been surrendered to the microcontroller, the microprocessor can access the flash ROM for purposes such as reprogramming the flash ROM, but it cannot return control to the microcontroller. Thus, the prior art solution requires that the entire content of the shared flash ROM be shadowed in the RAM such that all data stored in the flash ROM are accessible. However, as the flash ROM may store a number of optional data which may never be used such as language options and plug-and-play peripheral parameters, it is not desirable to copy fully the contents of the flash ROM into the main memory, as a full "shadow" backup in the main memory array unnecessarily consumes valuable main memory storage space.
Alternatively, key code segments of the flash ROM can be shadowed to economize on main memory consumption. However, on certain occasions, the computer system may need to access optional data stored on the flash ROM but not shadowed in the main memory array. Thus, the computer system may need to access to the flash ROM after it has released the ownership of the flash ROM to the microcontroller. Further, the "shadowed" version may occasionally be corrupted, necessitating a reload of the code and data images stored in the shared flash ROM. In such events, it is desirable to access the code and data images without requiring the system to be rebooted.
One problem with shadowing the flash ROM occurs when a warm reboot is invoked using a combination of the Control-Alt-Delete buttons on the IBM PC. Such a warm reboot may cause the processor to access the resource or flash ROM after it has released ownership of the flash ROM to the microcontroller, while the microcontroller is still asserting ownership of the flash ROM. In such event, a system lock-up would occur due to the contention for the shared resource or flash ROM between the processor and the microcontroller. Such lock-up possibility introduces instability to the computer system and is thus undesirable.